package com.demo2do.fms.queue.dao;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.demo2do.fms.entity.vehicle.trailer.Trailer;

/**
 *
 * @author Ark
 *
 */
@Dao("hibernate")
public interface TrailerDao {

    /**
     * @param brandCNCode
     * @return
     */
    @Query("FROM Trailer WHERE disabled = false AND brandCNCode = :brandCNCode")
    public Trailer getByBrandCNCode(@Variable("brandCNCode") String brandCNCode);
    
    /**
     * @param vamId
     * @return
     */
    @Query("FROM Trailer WHERE disabled = false AND vamId = :vamId")
    public Trailer getByVamid(@Variable("vamId") Long vamId);
    
}
